#!/bin/bash
while true;do
read -p "plase input a number: " a
if [ -z "$a" ];then
    echo "请输入数字"
fi
if echo $a|grep -qi 'end';then
    exit 0
else
    n=`echo $a|sed 's#[0-9]##g'|grep -v "^$"`
    if [ -n "$n" ];then
        echo "请输入数字"
    else
        echo $a|grep -v "^$"
    fi
fi
done
